var express = require('express');
var ioservice = require('../server/service/socketio.service');

var router = express.Router();

router.post('/order', function (req, res, next) {
    let merchantId = req.body.id;
    console.log('C端调用：订单更新接口，准备socket io通知..');
    console.log(req.body);
    console.log(merchantId);
    if (merchantId) {
        ioservice.notifyMerchant(merchantId);
    }
    res.end();
});

module.exports = router;
